package com.acwing.partition35;

import java.io.*;

/**
 * @author rkc
 * @date 2022/7/17 9:33
 */
public class AC3428放苹果 {

    private static int m, n;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        while (true) {
            String s = reader.readLine();
            if (s == null || s.isEmpty()) break;
            String[] ss = s.split(" ");
            m = Integer.parseInt(ss[0]); n = Integer.parseInt(ss[1]);
            writer.write(dfs(0, m, 0) + "\n");
        }
        writer.flush();
    }

    private static int dfs(int u, int sum, int last) {
        if (u == n) {
            if (sum == 0) return 1;
            return 0;
        }
        int res = 0;
        for (int i = last; i <= sum; i++) {
            res += dfs(u + 1, sum - i, i);
        }
        return res;
    }
}
